﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Survivor.src
{

    class IntroState : State
    {
        Textbox _newGame;
        Textbox _continue;
        Textbox _options;
        Textbox _exit;

        public IntroState(StateManager sm)
            : base("introstate", sm)
        {
            _newGame = new Textbox(0, 0, 80, 20, "New Game");
            _continue = new Textbox(0, 20, 80, 20, "Continue");
            _options = new Textbox(0, 40, 80, 20, "Options");
            _exit = new Textbox(0, 60, 80, 20, "Exit");
        }

        public override void Update(double dt)
        {
            if (_newGame.isPressed())
            {
                Console.WriteLine("New Game Pressed");
                Manager.AddChild(new GameState(Manager));
                Manager.Load();
            }
            if (_continue.isPressed())
            {
                Console.WriteLine("Continue Pressed");
            }
            if (_options.isPressed())
            {
                Console.WriteLine("Options Pressed");
            }
            if (_exit.isPressed())
            {
                Console.WriteLine("Exit Pressed");
                Manager.Stop();
                //Manager.RemoveChild(this);
            }
            base.Update(dt);
        }

        public override void Draw(double dt)
        {
            _newGame.Draw();
            _continue.Draw();
            _options.Draw();
            _exit.Draw();

            base.Draw(dt);
        }
    }
}
